package domain

import (
	"time"
)

type HostState struct {
	ID              string    `gorm:"primaryKey;type:varchar(255);"`
	IP              string    `gorm:"not null;type:varchar(255);"`
	Hostname        string    `gorm:"not null;type:varchar(255);"`
	HostState       int       `gorm:"not null;type:int;"`
	LastConnectTime time.Time `gorm:"not null;type:datetime;"`
	//LastDisconnectTime time.Time      `gorm:"not null"`
	LastDisconnectTime *time.Time // 允许为空
	HostCatalog        string     `gorm:"type:varchar(255);"`
}

func (*HostState) TableName() string {
	return "t_host_state"
}
